$(function () {
  // 旋转木马
  var mySwiper = new Swiper ('.swiper-container', {
    direction: 'horizontal', // 水平滑动
    loop: true,  // 循环播放
    grabCursor: true, // 手掌抓取
    effect: 'coverflow',
    slidesPerView: 3, // 设置容器能显示的数量
    // 如果需要分页器
    pagination: '.swiper-pagination',
    // 如果需要前进后退按钮
    nextButton: '.swiper-button-next',
    prevButton: '.swiper-button-prev',
    // 如果需要滚动条
    // scrollbar: '.swiper-scrollbar',
    coverflow: {
      rotate: 0, // 旋转角度
      stretch: -10,  // 拉伸
      depth: 80,  // 深度
      modifier: 5,  // 修正值
      slideShadows: false  // 页面阴影效果
    },
    // paginationClickable: true,
    paginationType: 'custom',//这里分页器类型必须设置为custom,即采用用户自定义配置
    //下面方法可以生成我们自定义的分页器到页面上
    paginationCustomRender: function(swiper, current, total) {
      var customPaginationHtml = "";
      for(var i = 0; i < total; i++) {
        //判断哪个分页器此刻应该被激活
        if(i == (current - 1)) {
          customPaginationHtml += '<span class="swiper-pagination-customs swiper-pagination-customs-active"></span>';
        } else {
          customPaginationHtml += '<span class="swiper-pagination-customs"></span>';
        }
      }
      return customPaginationHtml;
    }
  })

  // 资讯块遮罩
  /*$(".news-box").mouseenter(function () {
    $(this).find(".news-boxpopup").stop().animate({"height": "100%"},"slow")
  })
  $(".news-box").mouseleave(function () {
    $(this).find(".news-boxpopup").stop().animate({"height": "0"},"slow")
  })*/
  // 下载块动画
  /*var downTop = $(".zxg-download").offset().top;
  var windowTop;
  $(window).scroll(function () {
    windowTop = $(window).scrollTop()
    if(windowTop >= (downTop - 200)) {
      $(".download-img").animate({left: '0'},2000);
    }
  }).trigger('scroll');*/
});